Paginator
public abstract class Paginator
Constructor Summary | |
---|---|
protected void | __construct(mixed items, mixed listRows, mixed currentPage, mixed total, bool simple, mixed options) |
Method Summary | |
---|---|
static PaginatorCollection | make(null currentPage, bool simple, null total, array options, mixed items, mixed listRows) |
protected static void | setCurrentPage(mixed currentPage) |
protected string | url($page page) 获取页码对应的链接 |
static int | getCurrentPage(string varPage, int default) 自动获取当前页码 |
static string | 自动获取当前的path |
void | total() |
void | listRows() |
void | |
void | lastPage() |
boolean | hasPages() 数据是否足够分页 |
array | getUrlRange(int start, int end) 创建一组分页链接 |
$this | fragment(string|null fragment) 设置URL锚点 |
$this | appends(array|string key, string|null value) 添加URL参数 |
protected string | 构造锚点字符串 |
abstract mixed | render() 渲染分页html |
protected void __construct(mixed items, mixed listRows, mixed currentPage, mixed total, bool simple, mixed options)
public static PaginatorCollection make(null currentPage, bool simple, null total, array options, mixed items, mixed listRows)
protected static void setCurrentPage(mixed currentPage)
protected string url($page page)
获取页码对应的链接
public static int getCurrentPage(string varPage, int default)
自动获取当前页码
public static string getCurrentPath()
自动获取当前的path
public void total()
public void listRows()
public void currentPage()
public void lastPage()
public boolean hasPages()
数据是否足够分页
public array getUrlRange(int start, int end)
创建一组分页链接
public $this fragment(string|null fragment)
设置URL锚点
public $this appends(array|string key, string|null value)
添加URL参数
protected string buildFragment()
构造锚点字符串
public abstract mixed render()
渲染分页html